import request from "@/utils/request";

/**
 * 获取题库列表
 * @param params
 * @returns {*}
 */
export function getQuestionList(params) {
    return request({
        url: "/adminapi/v1.exam.ExamQuestion",
        method: "get",
        params,
    });
}

/**
 * 添加题库或者修改题库
 * @param data
 * @returns {*}
 */
export function createQuestionOrUpdate(data) {
    return request({
        url: "/adminapi/v1.exam.ExamQuestion/createOrUpdate",
        method: "POST",
        data,
    });
}

/**
 * 获取所有试卷库数据
 * @param data
 * @returns {*}
 */
export function getPaperList(data) {
    return request({
        url: "/adminapi/v1.exam.ExamPaper",
        method: "POST",
        data,
    });
}

/**
 * 添加修改试卷库
 * @param data
 * @returns {*}
 */
export function creatPaperOrUpdate(data) {
    return request({
        url: "/adminapi/v1.exam.ExamPaper/creatOrUpdate",
        method: "POST",
        data,
    });
}

/**
 * 删除试卷库
 * @param data
 * @returns {*}
 */
export function deletePaper(data) {
    return request({
        url: "/adminapi/v1.exam.ExamPaper/delete",
        method: "POST",
        data,
    });
}

/**
 * 查询所有试卷
 * @param data
 * @returns {*}
 */
export function deleteQuestion(data) {
    return request({
        url: "/adminapi/v1.exam.ExamQuestion/delete",
        method: "POST",
        data,
    });
}

/**
 * 查询所有考试列表
 * @param data
 * @returns {*}
 */
export function getExamSendList(data) {
    return request({
        url: "/adminapi/v1.exam.ExamSend",
        method: "POST",
        data,
    });
}

/**
 * 添加或者更新发不考试
 * @param data
 * @returns {*}
 */
export function createExamSendOrUpdate(data) {
    return request({
        url: "/adminapi/v1.exam.ExamSend/createOrUpdate",
        method: "POST",
        data,
    });
}

/**
 * 删除发布考试
 * @param data
 * @returns {*}
 */
export function deleteExamSend(data) {
    return request({
        url: "/adminapi/v1.exam.ExamSend/delete",
        method: "POST",
        data,
    });
}


/**
 * 查询所有学生考试记录
 * @param data
 * @returns {*}
 */
export function getRecordList(data) {
    return request({
        url: "/adminapi/v1.exam.ExamRecord",
        method: "POST",
        data,
    });
}

/**
 * 删除学生考试记录
 * @param data
 * @returns {*}
 */
export function delRecord(data) {
    return request({
        url: "/adminapi/v1.exam.ExamRecord/delete",
        method: "POST",
        data,
    });
}

/**
 * 修改
 * @param data
 * @returns {*}
 */
export function createOrUpdate(data) {
    return request({
        url: "/adminapi/v1.exam.ExamRecord/createOrUpdate",
        method: "POST",
        data,
    });
}

/**
 * 预览试卷
 * @param data
 * @returns {*}
 */
export function searchPaperTopic(data) {
    return request({
        url: "/adminapi/v1.exam.ExamPaper/searchPaperTopic",
        method: "POST",
        data,
    });
}

/**
 * 查询监控分配数据
 * @param data
 * @returns {*}
 */
export function getExamMonitorList(data) {
    return request({
        url: "/adminapi/v1.exam.ExamMonitorList",
        method: "POST",
        data,
    });
}

/**
 * 删除监考名单
 * @param data
 * @returns {*}
 */
export function delMonitorList(data) {
    return request({
        url: "/adminapi/v1.exam.ExamMonitorList/delete",
        method: "POST",
        data,
    });
}

/**
 * 添加监考列表或者更新
 * @param data
 * @returns {*}
 */
export function createMonitorOrUpdate(data) {
    return request({
        url: "/adminapi/v1.exam.ExamMonitorList/createOrUpdate",
        method: "POST",
        data,
    });
}

/**
 * 根据监考和考试批次查询监考学生名单
 * @param data
 * @returns {*}
 */
export function getUserFromId(data) {
    return request({
        url: "/adminapi/v1.exam.ExamMonitorList/getUserFromId",
        method: "POST",
        data,
    });
}

/**
 * 批阅试卷
 * @param data
 * @returns {*}
 */
export function MarkingPapers(data) {
    return request({
        url: "/adminapi/v1.exam.ExamRecord/MarkingPapers",
        method: "POST",
        data,
    });
}


/**
 * 视频监控回放
 * @param data
 * @returns {*}
 */
export function selectVideUrl(data) {
    return request({
        url: "/adminapi/v1.exam.ExamRecord/selectVideUrl",
        method: "POST",
        data,
    });
}

/**
 * 查询当前正在考试的人数
 * @param data
 * @returns {*}
 */
export function examPerson(data) {
    return request({
        url: "/adminapi/v1.exam.ExamMonitorList/examPerson",
        method: "POST",
        data,
    });
}

/**
 * 获取当前考试批次的异常人员名单
 * @param data
 * @returns {*}
 */
export function getExamTryRoll(data) {
    return request({
        url: "/adminapi/v1.exam.ExamMonitorList/getExamTryRoll",
        method: "POST",
        data,
    });
}
